<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <title>Volcreate - 博客</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <link rel="stylesheet" href="../static/css/mine.css">
</head>
<body>

<!--导航-->
<nav th:replace="_fragments :: menu(3)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small"> <!--tb : top and bottom-->
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui  header item">Volcreate</h2>
            <!--icon的地址-->
            <!--https://semantic-ui.com/elements/icon.html#interfaces-->
            <a href="index.html" class="m-item item m-mobile-hide"><i class="home icon"></i>首页</a>
            <a href="category.html" class="m-item item m-mobile-hide"><i class="idea icon"></i>博客筛选</a>
            <a href="blogs.html" class="m-item item m-mobile-hide"><i class="blogger icon"></i>博客</a>
            <a href="archive.html" class="m-item item m-mobile-hide"><i class="clone icon"></i>归档</a>
            <a href="more.html" class="m-item item m-mobile-hide"><i class="bars icon"></i>更多</a>
            <a href="about.html" class="m-item item m-mobile-hide"><i class="info icon"></i>关于我</a>

            <div class="right m-item item m-mobile-hide">
                <div class="ui inverted transparent m-padded-tb-small input icon">
                    <input type="text" placeholder="Search....">
                    <i class="search link icon"></i>
                </div>
            </div>

        </div>
    </div>
    <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
        <i class="sidebar icon"></i>
    </a>
</nav>






<!--中间内容-->
<div class="m-container m-padded-tb-big">
    <div class="ui container">
        <div class="ui stackable grid">

            <!--blog list on the left side-->
            <div class="eleven wide column" >
                <!--navigation bar-->
                <div class="ui top attached segment">
                    <div class="ui middle aligned two column grid">
                        <div class="left aligned column">
                            <h3 class="ui  header">博客</h3>
                        </div>
                        <div class="right aligned column">
                            共 <h3 class="ui header m-inline-block m-text-thin" th:text="${page.pages}">0</h3> 篇
                        </div>
                    </div>
                </div>

                <!--content-->
                <div class="ui attached segment" id="blog-container">
                    <div th:fragment="blogsList">
                        <!--a blog-->
                        <div class="ui padded segment m-padded-tb m-mobile-lr-narrow" th:each="blog : ${page.list}">
                            <div class="ui middle aligned mobile reversed stackable grid" >
                                <!--content-->
                                <div class="thirteen wide column">
                                    <!--content-->
                                    <div class="content">
                                        <!--title-->
                                        <h3 class="ui header"><a href="#" class="m-black" target="_blank" th:href="@{/blog/{id}(id=${blog.id})}"  th:text="${blog.title}">title</a></h3>

                                        <!--description-->
                                        <div class="description"><p class="m-text" th:text="${blog.description}">text</p></div>
                                    </div>

                                    <!--bottom info-->
                                    <div class="ui middle aligned stackable two row grid">
                                        <!--博客-->
                                        <div class="row m-padded-top-large">
                                            <!--info-->
                                            <div class="left aligned eleven wide column">
                                                <div class="ui mini horizontal link list">
                                                    <!--personality-->
                                                    <div class="item">
                                                        <!--portraits-->
                                                        <img src="https://picsum.photos/id/237/100/100" th:src="@{${blog.user.avatar}}" alt="" class="ui avatar image" th:href="@{/blog/{id}(id=${blog.id})}">
                                                        <!--name-->
                                                        <div class="content"><a href="#" class="author" th:text="${blog.user.nickname}">zxc</a></div>
                                                    </div>
                                                    <!--calendar-->
                                                    <div class="item"><i class="calendar icon"></i><span th:text="|  ${#dates.format(blog.gmtModified,'yyyy-MM-dd')}|">2020-8-17更新时间</span></div>
                                                    <!--times-->
                                                    <div class="item"><i class="eye icon"></i><span th:text="|  ${blog.views}|">1234浏览次数</span></div>
                                                </div>
                                            </div>
                                            <!--to learn more-->
                                            <div class="right aligned five wide column">
                                                <a href="#" th:href="@{/fast/type/{id}(id=${blog.type.id})}" target="_blank" class="ui brown label m-padded-tiny m-text-thin" th:text="${blog.type.name}">类别</a>
                                            </div>
                                        </div>
                                        <!--标签-->
                                        <div class="row m-padded-top-mini">
                                            <div  th:each="tag : ${blog.tags}" >
                                                <a href="#" th:href="@{/fast/tag/{id}(id=${tag.id})}" target="_blank" class="ui black basic left pointing label mini m-padded-tb-mini" th:text="${tag.name}">linux</a>
                                            </div>
                                        </div>

                                    </div>

                                </div>

                                <!--linked image-->
                                <div class="three wide column">
                                    <a href="blog.html" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="center aligned images">
                                        <img src="../static/images/c1.jpeg" th:src="@{${blog.firstPicture}}" class="ui rounded medium image" alt="" style="height: 8em;width: auto;" />
                                    </a>
                                </div>

                            </div>
                        </div>

                        <!--footer page-control-->
                        <div class="ui bottom attached segment" th:if="${page.pages}>1">
                            <div class="ui middle aligned two column grid">
                                <div class="left aligned column">
                                    <a onclick="page(this)" th:attr="data-page=${page.pageNum}-1" th:unless="${page.isFirstPage}" class="ui basic  button"><i class="left chevron icon"></i>previous</a>
                                </div>
                                <div class="right aligned column">
                                    <a onclick="page(this)" th:attr="data-page=${page.pageNum}+1" th:unless="${page.isLastPage}" class="ui basic  button" >next<i class="right chevron icon"></i></a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>



            </div>

            <!--navigation on the left side-->
            <div class="five wide column">
                <!--分类-->
                <div class="ui segments">
                    <!--top bar-->
                    <div class="ui secondary segment">
                        <div class="ui two column grid">
                            <div class="left aligned column">
                                <i class="idea icon"></i>分类
                            </div>
                            <div class="right aligned column">
                                <a href="#" th:href="@{/fast}" target="_blank" class="m-black"><i class="list ul icon"></i>more</a>
                            </div>
                        </div>
                    </div>
                    <div class="ui  segment">
                        <div class="ui fluid vertical menu" >
                            <a href="#" class="item" target="_blank" th:each="type : ${types.list}" th:href="@{/fast/type/{id}(id=${type.id})}">
                                <span th:text="${type.name}">类型</span>
                                <div class="ui black basic left pointing label">
                                    <span th:text="${type.blogSize}">13</span>
                                </div>
                            </a>
                            <!--/*-->
                            <a href="#" class="item">开发日常<div class="ui black basic left pointing label">13</div></a>
                            <!--*/-->
                        </div>
                    </div>
                </div>

                <!--标签-->
                <div class="ui segments m-margin-top-large">
                    <!--top bar-->
                    <div class="ui secondary segment">
                        <i class="tags icon"></i>标签
                    </div>
                    <div class="ui segment" >
                        <a href="#" class="ui black basic left pointing label m-margin-tb-tiny" target="_blank"  th:href="@{/fast/tag/{id}(id=${tag.id})}" th:each="tag : ${tags.list}">
                            <span th:text="${tag.name}">linux</span>
                            <div class="detail">
                                <span th:text="${tag.blogSize}">23</span>
                            </div>
                        </a>
                        <!--/*-->
                        <a href="#" class="ui black basic left pointing label m-margin-tb-tiny">linux <div class="detail">23</div></a>
                        <a href="#" class="ui black basic left pointing label m-margin-tb-tiny">linux <div class="detail">23</div></a>
                        <a href="#" class="ui black basic left pointing label m-margin-tb-tiny">linux <div class="detail">23</div></a>
                        <a href="#" class="ui black basic left pointing label m-margin-tb-tiny">linux <div class="detail">23</div></a>
                        <a href="#" class="ui black basic left pointing label m-margin-tb-tiny">linux <div class="detail">23</div></a>
                        <!--*/-->
                    </div>
                </div>

                <!--推荐-->
                <div class="ui segments m-margin-top-large">
                    <div class="ui secondary segment">
                        <i class="bookmark icon"></i>推荐
                    </div>
                    <div class="ui vertical fluid item menu" >
                        <a href="#" th:each="blog : ${blogs.list}" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="m-margin-tb-tiny item" th:text="${blog.title}" >story</a>
                    </div>
                </div>

                <!--二维码-->
                <h5 class="ui horizontal divider header m-margin-top-large">关注我</h5>
                <div class="ui center aligned grid m-padded-tb">一起学习</div>
                <div class="ui centered card" style="width: 12em">
                    <img src="../static/images/c1.jpeg" alt="" class="ui rounded image" />
                </div>
            </div>


        </div>
    </div>
</div>


<!--底部footer-->
<footer th:replace="_fragments :: footer"  class="ui inverted vertical segment m-padded-tb-massive">
    <div class="ui center aligned container">
        <div class="ui inverted divided stackable grid">

            <div class="five wide column">
                <div class="ui list">
                    <div class="item">
                        <img src="../static/images/bk1.jpeg" class="ui rounded image" style="width: 140px" alt=""/>
                    </div>
                </div>
            </div>

            <div class="six wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced">最新博客</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">hello 大家好我是你们的____</a>
                    <a href="#" class="item">说到____相信大家并不陌生</a>
                    <a href="#" class="item">近日一位外国小伙又整了一个____新活</a>
                </div>
            </div>

            <div class="five wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced">简介</h4>
                <!--  版本号  -->
                <p class="m-opacity-mini">Version 0.0.1</p>
                <!--  -->
                <p class="inverted m-opacity-mini"> create the value of life </p>
            </div>

        </div>
        <div class="ui inverted section divider">️</div>
        <p class="m-text-thin m-text-spaced m-opacity-mini m-opacity-tiny"> Copyright © 2020 - 2021 Volcreate Designed by zxc </p>
    </div>
</footer>

<!----------------JS---------------->
<!--/*/<th:block th:replace="_fragments :: script" >/*/-->
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js" ></script>
<script src="../static/js/mine.js"></script>
<!--/*/</th:block>/*/-->

<script>

    function page(obj) {
        loaddata($(obj).data("page"));
    }
    function loaddata(k) {
        $("#blog-container").load(/*[[@{/blogs}]]*/"/blogs",{
            page : k
        });
    }
</script>
<!----------------JS---------------->
</body>
</html>